home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1990-10-01 | 2.8 KB | 101 lines | [ TEXT/QED1]
This document describes the structure of a CK document file. It is supplied for the convenience of programmers or sophisticated user who would like to extract information from CK documents. TYPES =============================================================================== The file structure uses the following types: AmtString = STRING[14]; CatString = STRING[17]; PayeeString = STRING[90]; MemoString = STRING[45]; DateRec = RECORD Month: INTEGER; Day: INTEGER; Year: INTEGER; END; CatRec = RECORD NextCat: Handle; CatName: CatString; Sign: INTEGER; NumEntries: INTEGER; CatTotal: LONGINT; NumCleared: INTEGER; AmtCleared: LONGINT; AutoAmt: LONGINT; AutoPayee: PayeeString; AutoON: BOOLEAN; PrevCat: Handle; CatNum: Integer; BudgetAmt: Longint; BudgetON: Boolean; END; EntRec = RECORD NextEnt: Handle; EntNum: INTEGER; { A check #, -1 = dashes, -2 = blanks } Payee: PayeeString; Memo: MemoString; Amount: LONGINT; Cat: INTEGER; { # of categ. entry belongs to } Date: DateRec; Cleared: Boolean; { Posted/Not Posted } Locked: Boolean; TaxFlag: Boolean; PrevEnt: Handle; RecordNum: Integer; { # entry was added to file } END; HeaderRec = RECORD NumRecs: INTEGER; { # of entries } NumCleared: INTEGER; { # entries posted } NumCats: INTEGER; { # of categories } Balance: LONGINT; { Overall balance } RcnclBal: LONGINT; { Balance amt of posted entries } CredTotal: LONGINT; { Total credit entries } DebTotal: LONGINT; { Total debit entries } FirstEnt: Handle; { Handle to 1st entry } FirstCat: Handle; { Handle to 1st category } CurrEnt: INTEGER; { Entry we're on now } CatEdit: INTEGER; { # of categ being edited } LastEntNum: INTEGER; { Last CkNum used } CKVersion: INTEGER; { What version is this file? } LastRecNum: Longint; lastDate: DateRec; END; File Structure =============================================================================== A CK document file has the following structure: * A header of type HeaderRec * An array of records of type CatRec * An array of records of type EntRec Amounts =============================================================================== All CK amounts are Longint values that are interpreted as cents values; that is, a value of 100 indicates an amount of $1.00. All amounts are positive numbers. The credit or debit status of an entry's category is used to determine if the amount is positive or negative. Category Numbers =============================================================================== The EntRec type contains an elements, "Cat". This is the zero-based number of the category the entry belongs to. Categories are stored in the file in order.